package com.shop2cn.iapi.wxcomponent.parameter;

/**
 * @ClassName :EventEnum
 * @Author :MrCao
 * @Description : 消息时间推送枚举类
 * @Date : Create in 17:18 2019/12/11
 * @Modified BY:
 */
public enum EventEnum {

    WXA_NICKNAME_AUDIT(0,"wxa_nickname_audit","名称审核"),
    WEAPP_AUDIT_SUCCESS(1,"weapp_audit_success","代码审核通过"),
    WEAPP_AUDIT_FAIL(2,"weapp_audit_fail","代码审核失败"),
    WEAPP_AUDIT_DELAY(3,"weapp_audit_delay","代码审核延后");


    private int code;
    private String value;
    private String message;


    EventEnum(int code, String value, String message) {
        this.code = code;
        this.value = value;
        this.message = message;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    /**
     * 通过代值获取枚举项
     *
     * @param value
     * @return
     */
    public static EventEnum getByValue(String value) {
        for (EventEnum eventEnum : EventEnum.values()) {
            if (eventEnum.getValue().equals(value.trim())) {
                return eventEnum;
            }
        }
        return null;
    }
}
